package practice.p2;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class FeedBackServer {
    public static void main(String[] args) throws IOException {
        ServerSocket serverSocket=new ServerSocket(10088);

        Socket socket = serverSocket.accept();

        InputStream inputStream = socket.getInputStream();
        InputStreamReader inputStreamReader=new InputStreamReader(inputStream);
        int num;
        while ((num = inputStreamReader.read()) != -1) {
            System.out.print((char) num);
        }

        OutputStream outputStream = socket.getOutputStream();
        outputStream.write("已收到".getBytes());

        socket.close();
    }
}
